/* Copyright 2009
 *
 * This program and the accompanying materials
 * are made available under the terms of the
 * Eclipse Public License v1.0 which accompanies
 * this distribution, and is available at
 *
 * 		http://www.eclipse.org/legal/epl-v10.html
 *
 * Unless required by applicable law or agreed to in
 * writing, software distributed under the License is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
 * OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing
 * permissions and limitations under the License.
 *
 * Contributors:
 * 	   IBM Corporation - initial API and implementation for JDT/DLTK
 *     Sean W. Quinn - initial adoption for use with PHP from various sources.
 */
package org.eclipse.php.internal.core;

import org.eclipse.dltk.compiler.CharOperation;
import org.eclipse.php.internal.core.ast.util.Util;

/**
 * <p>
 * A convenience class that extends the existing
 * {@link org.eclipse.php.internal.core.PHPCorePlugin} class. It is aimed at
 * extending the functionality of the existing interface without having to
 * directly touch it. Ideally it would be merged with {@code PHPCorePlugin} and
 * the references fixed.
 * </p>
 *
 * @author Sean W. Quinn (swquinn@gmail.com)
 */
public class PHPCorePluginExt extends PHPCorePlugin {

	public static final String PLUGIN_ID = PHPCorePlugin.ID; //$NON-NLS-1$

	/**
	 * Configurable option value: {@value} .
	 *
	 * @category OptionValue
	 */
	public static final String DO_NOT_INSERT = "do not insert"; //$NON-NLS-1$

	/**
	 * Configurable option value: {@value} .
	 *
	 * @category OptionValue
	 */
	public static final String INSERT = "insert"; //$NON-NLS-1$

	/**
	 * Value of the content-type for Java source files. Use this value to
	 * retrieve the Java content type from the content type manager, and to add
	 * new Java-like extensions to this content type.
	 *
	 * @see org.eclipse.core.runtime.content.IContentTypeManager#getContentType(String)
	 * @see #getPHPLikeExtensions()
	 * @since 3.2
	 */
	public static final String PHP_SOURCE_CONTENT_TYPE = PHPCorePluginExt.PLUGIN_ID + ".javaSource"; //$NON-NLS-1$

	/**
	 * Returns the list of known Java-like extensions. Java like extension are
	 * defined in the
	 * {@link org.eclipse.core.runtime.Platform#getContentTypeManager() content
	 * type manager} for the {@link #JAVA_SOURCE_CONTENT_TYPE}. Note that a
	 * Java-like extension doesn't include the leading dot ('.'). Also note that
	 * the "java" extension is always defined as a Java-like extension.
	 *
	 * @return the list of known Java-like extensions.
	 * @since 3.2
	 */
	public static String[] getPHPLikeExtensions() {
		return CharOperation.toStrings(Util.getPhpLikeExtensions());
	}
}
